package com.example.game;

//定义一个图标对象，用于存储图标的id，图标的图片id，图标是否可以点击，图标是否正确
public class Icon {
    private int iconId;//唯一标识一个图标
    private int imageId;//图像资源ID
    private boolean canClick;//指示是否可以点击
    private boolean isRight = false;//表示图标是否处于正确的状态或位置

    public Icon() {
        this.imageId = -1;
        this.canClick = true;
    }

    public Icon(int imageId, boolean canClick) {
        this.imageId = imageId;
        this.canClick = canClick;
    }

    public void SetIconId(int iconId){
        this.iconId = iconId;
    }

    public int GetIconId(){
        return this.iconId;
    }

    public void SetImageId(int imageId){
        this.imageId = imageId;
    }

    public int GetImageId(){
        return imageId;
    }

    public void SetCanClick(boolean canClick){
        this.canClick = canClick;
    }

    public boolean GetCanClick(){
        return this.canClick;
    }

    public void SetIsRight(boolean isRight){
        this.isRight = isRight;
    }
    public boolean GetIsRight(){
        if(!this.canClick)
            return true;
        else
            return this.isRight;
    }
}
